﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class User_LendingTrend : System.Web.UI.Page
{
    public static string linedata = "0,0,0,0,0,0,0,0,0,0,0,0";
    protected void Page_Load(object sender, EventArgs e)
    {
        string readerid = "";
        if (!IsPostBack)
        {
            if (Session["userName"] != null)
            {
                readerid = Session["userName"].ToString();
                SQL sql = new SQL();
                linedata = sql.readerLendingData("2016",readerid);
            } 
            else
            {
                Response.Write("<script language=javascript>alert('您还没有登陆');window.location = '../Common/BMindex.aspx';</script>");
            }
           
        }
    }
    protected void years_SelectedIndexChanged(object sender, EventArgs e)
    {

        if (Session["userName"] != null)
        {
            string readerid = Session["userName"].ToString();
            string[] year = new string[12];
            string nowyear = years.SelectedItem.Text;
            SQL sql = new SQL();
            linedata = sql.readerLendingData(nowyear, readerid);
        }
        else
        {
            Response.Write("<script language=javascript>alert('您还没有登陆');window.location = '../Common/BMindex.aspx';</script>");
        }
       
         
    }
}